
class datas.XMLVessel {
    static var myLoader, CategroyArray, picData, picSortArray, main;

    function XMLVessel() {
    } 

    static function loadXML(url) {
        myLoader = new XML();
        datas.XMLVessel.myLoader.ignoreWhite = true;
        datas.XMLVessel.myLoader.onData = datas.XMLVessel.xmlLoaded;
        _root.js_teamId = url;
        datas.XMLVessel.myLoader.load(_root.headURL + "/group-" + url + ".xml");
        Main.root.vessel.txt_mc.mc.ding_mc.gotoAndStop(1);
    } 

    static function loadMainXML(url) {
        myLoader = new XML();
        datas.XMLVessel.myLoader.ignoreWhite = true;
        datas.XMLVessel.myLoader.onData = datas.XMLVessel.loadcategoryXml;
        datas.XMLVessel.myLoader.load(_root.headURL + url);
    } 

    static function loadcategoryXml(data) {
        myLoader = new XML();
        datas.XMLVessel.myLoader.ignoreWhite = true;
        datas.XMLVessel.myLoader.parseXML(data);
        CategroyArray = [];
        var _loc2 = datas.XMLVessel.myLoader.firstChild.childNodes.length;
        for (var _loc1 = 0;_loc1 < _loc2; ++_loc1) {
            datas.XMLVessel.CategroyArray.push(datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.id);
        }
    } 

    static function xmlLoaded(data) {
        picData = {};
        picSortArray = [];
        Main.root.btn_mc.num = 0;
        for (var _loc9 in Main.root.panel) {
            if (Main.root.panel[_loc9]._name != "show_mc") {
                Main.root.panel[_loc9].removeMovieClip();
            }
        } 
        myLoader = new XML();
        datas.XMLVessel.myLoader.ignoreWhite = true;
        datas.XMLVessel.myLoader.parseXML(data);
        datas.XMLVessel.picData.id = datas.XMLVessel.myLoader.firstChild.attributes.id;
        datas.XMLVessel.picData.msg = datas.XMLVessel.myLoader.firstChild.attributes.t;
        var _loc8 = datas.XMLVessel.myLoader.firstChild.childNodes.length;
        for (var _loc1 = 0;_loc1 < _loc8; ++_loc1) {
            datas.XMLVessel.picSortArray.push(datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.id);
            datas.XMLVessel.picData[datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.id] = {id: datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.id, small: String(datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.url), big: String(datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.url4), msg: String(datas.XMLVessel.myLoader.firstChild.childNodes[_loc1].attributes.t)};
            datas.XMLVessel.main.fillPanel(_loc1);
        } 
        if (Main.upBoolean) {
            Main.root.picId = datas.XMLVessel.picSortArray[datas.XMLVessel.picSortArray.length - 1];
        } 
        Main.root.logs.text = Main.root.logs.text + ("id:" + Main.root.picId);
        for (var _loc2 = 0;_loc2 < datas.XMLVessel.picSortArray.length; ++_loc2) {
            if (Main.root.picId == datas.XMLVessel.picSortArray[_loc2]) {
                Main.root.logs.text = Main.root.logs.text + (_loc2);
                for (var _loc3 = 0;_loc3 < int(_loc2 / 9); ++_loc3) {
                    Main.root.btnsmc.next_btn.onPress();
                } 
                Main.root.panel["mc_" + _loc2 % 9].onPress();
                return;
            }
        } 
        Main.root.panel.mc_0.onPress();
    }
}
